<?php
class Query {
	public static $INSERT = 10;
	public static $UPDATE = 20;
	public static $DELETE = 30;
	public static $DROP = 40;
	public static $CREATE = 50;
	public static $SELECT = 60;
	
	private $database = NULL;
	private $command = NULL;
	private $conn = NULL;
	private $sql = '';
	
	public function __construct($conn) {
		if(!Utility::existsVar($conn) && !is_object($conn))
			throw new Exception('Erro ao criar conexao.');
		
		$this->conn = $conn;
	}
	
	/**
	 * @return the $_database
	 */
	public function getDatabase() {
		return $this->database;
	}

	/**
	 * @return the $_command
	 */
	public function getCommand() {
		return $this->command;
	}

	/**
	 * @param field_type $_database
	 */
	public function setDatabase($database) {
		if(!Utility::existsVar($database) || !is_string($database))
			$this->database = NULL;
		else
			$this->database = $database;
	}

	/**
	 * @param field_type $_command
	 */
	public function setCommand($command) {
		if(!Utility::existsVar($database) || !is_int($command))
			$this->database = NULL;
		else
			$this->database = $database;
	}
}
?>
